<?php

/* 
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
require_once 'db_conn.php';
/*echo $_POST['username']."<br/>";
echo $_POST['sex']."<br/>";
echo $_POST['message']."<br/>";
echo $_POST['imgurl']."<br/>";*/

$username=$_POST['username'];
$message=$_POST['message'];
$sex=$_POST['sex'];
$imgurl=$_POST['imgurl'];

$sql="insert into t_message(username,message,sex,imgurl) values('$username','$message','$sex','$imgurl')";
$result=$db->query($sql);

header("Location:index.php");